app.controller('ChaoshiCtrl', ['$scope','$http',function($scope,$http) {
	
	
	$http({
		method:'get',
		url:"js/data.json"
	}).then(function (res) {
		console.log(res);
		$scope.data = res.data.data;
		console.log($scope.data);
		$scope.rights = res.data.data.products[103532];
	});
	$scope.xiabiao = 0;
	$scope.qh = function (index) {
		$scope.xiabiao = index;
		$scope.id = $scope.data.categories[index].id;	
		console.log($scope.id)
		$scope.rights = $scope.data.products[$scope.id];
	}
}])